<?php
/*********************************************
  CPG Dragonfly™ CMS
  ********************************************
  Copyright © 2004 - 2007 by CPG-Nuke Dev Team
  http://dragonflycms.org

  Dragonfly is released under the terms and conditions
  of the GNU GPL version 2 or any later version
**********************************************/

// as of v10
function define_nobody($file) {
	trigger_deprecated('Use the already available PHP::$asNobody');
}

# Time Formatting
function formatDateTime($time, $format) {
	trigger_deprecated();
	return L10NTime::strftime($format, $time);
}

# IP Handling
function ip2long32($ip, $unsigned=false) {
	trigger_deprecated();
	return Dragonfly_Net::ip2long($ip);
}

function decode_ip($ip) {
	trigger_deprecated();
	return Dragonfly_Net::decode_ip($ip);
}

# Caching
function cache_save_array($name, $module_name='config', $array=false) {
	trigger_deprecated('Use Dragonfly::getKernel()->CACHE->set($key, $array)');
	Dragonfly::getKernel()->CACHE->set("modules/{$module_name}/{$name}", $array);
}
function cache_load_array($name, $module_name='config', $global=true) {
	trigger_deprecated('Use Dragonfly::getKernel()->CACHE->get($key)');
	$data = Dragonfly::getKernel()->CACHE->get("modules/{$module_name}/{$name}");
	if ($global) { $GLOBALS[$name] = $data; }
	return $data;
}
function cache_delete_array($name, $module_name='config') {
	trigger_deprecated('Use Dragonfly::getKernel()->CACHE->delete($key)');
	Dragonfly::getKernel()->CACHE->delete("modules/{$module_name}/{$name}");
}
